package com.hnkywl.sts.entity.jhgl;

import com.hnkywl.sts.entity.organ.*;
import com.hnkywl.sts.entity.sys.Yg;
import org.hibernate.annotations.NotFound;
import org.hibernate.annotations.NotFoundAction;

import javax.persistence.*;
import java.util.Date;

/**
 * 保供付款计划，资金支付
 */
@Entity
@Table(name = "T_BIZ_BGFKJH_ZJFK")
public class Bgfkjh {
    //ID
    @Id
    @SequenceGenerator(name = "seqBgfkjh", allocationSize = 1, sequenceName = "SEQ_BIZ_BGFKJH_ZJFK")
    @GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "seqBgfkjh")
    private Long id;

    // 保供业务部门(8个) ,保供贸易部
    //保供付款不分部门付款，取消该字段
    @ManyToOne(fetch = FetchType.LAZY)
    @JoinColumn(name = "NBBM_ID")
    @NotFound(action = NotFoundAction.IGNORE)
    private Nbbm bgmyb;

    /**
     * 内部公司
     */
    @ManyToOne(fetch = FetchType.LAZY)
    @JoinColumn(name = "NBGS_ID")
    @NotFound(action = NotFoundAction.IGNORE)
    private Gsjg nbgs;


    // 保供供应商(企业机构)
    @ManyToOne(fetch = FetchType.LAZY)
    @JoinColumn(name = "QYJG_ID")
    @NotFound(action = NotFoundAction.IGNORE)
    private Qyjg gys;

    // 资金付款年
    private Integer zjfkyear;

    // 资金付款月
    private Integer zjkfmonth;

    // 付款金额
    private Double je;

    // 制单人
    @ManyToOne(fetch = FetchType.LAZY)
    @JoinColumn(name = "ZDR_ID")
    @NotFound(action = NotFoundAction.IGNORE)
    private Yg zdr;

    // 制单日期
    private Date zdrq;

    // 支付类型 zftype = 1 货币支付 zftype = 2 冲销
    private Integer zftype;

    // 备注
    private String bz;

    /**
     * 转出公司
     * 保供付款冲销功能去除，取消该字段
     */
    @ManyToOne(fetch = FetchType.LAZY)
    @JoinColumn(name = "ZCGS_ID")
    @NotFound(action = NotFoundAction.IGNORE)
    private Gsjg zcgs;
    /**
     * 转出部门
     * 保供付款冲销功能去除，取消该字段
     */
    @ManyToOne(fetch = FetchType.LAZY)
    @JoinColumn(name = "ZCBM_ID")
    @NotFound(action = NotFoundAction.IGNORE)
    private Nbbm zcbm;

    /**
     * 转入公司
     * 保供付款冲销功能去除，取消该字段
     */
    @ManyToOne(fetch = FetchType.LAZY)
    @JoinColumn(name = "ZRGS_ID")
    @NotFound(action = NotFoundAction.IGNORE)
    private Gsjg zrgs;

    /**
     * 转入部门
     * 保供付款冲销功能去除，取消该字段
     */
    @ManyToOne(fetch = FetchType.LAZY)
    @JoinColumn(name = "ZRBM_ID")
    @NotFound(action = NotFoundAction.IGNORE)
    private Nbbm zrbm;

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public Nbbm getBgmyb() {
        return bgmyb;
    }

    public void setBgmyb(Nbbm bgmyb) {
        this.bgmyb = bgmyb;
    }

    public Gsjg getNbgs() {
        return nbgs;
    }

    public void setNbgs(Gsjg nbgs) {
        this.nbgs = nbgs;
    }

    public Qyjg getGys() {
        return gys;
    }

    public void setGys(Qyjg gys) {
        this.gys = gys;
    }

    public Integer getZjfkyear() {
        return zjfkyear;
    }

    public void setZjfkyear(Integer zjfkyear) {
        this.zjfkyear = zjfkyear;
    }

    public Integer getZjkfmonth() {
        return zjkfmonth;
    }

    public void setZjkfmonth(Integer zjkfmonth) {
        this.zjkfmonth = zjkfmonth;
    }

    public Double getJe() {
        return je;
    }

    public void setJe(Double je) {
        this.je = je;
    }

    public Yg getZdr() {
        return zdr;
    }

    public void setZdr(Yg zdr) {
        this.zdr = zdr;
    }

    public Date getZdrq() {
        return zdrq;
    }

    public void setZdrq(Date zdrq) {
        this.zdrq = zdrq;
    }

    public Integer getZftype() {
        return zftype;
    }

    public void setZftype(Integer zftype) {
        this.zftype = zftype;
    }

    public String getBz() {
        return bz;
    }

    public void setBz(String bz) {
        this.bz = bz;
    }

    public Gsjg getZcgs() {
        return zcgs;
    }

    public void setZcgs(Gsjg zcgs) {
        this.zcgs = zcgs;
    }

    public Nbbm getZcbm() {
        return zcbm;
    }

    public void setZcbm(Nbbm zcbm) {
        this.zcbm = zcbm;
    }

    public Gsjg getZrgs() {
        return zrgs;
    }

    public void setZrgs(Gsjg zrgs) {
        this.zrgs = zrgs;
    }

    public Nbbm getZrbm() {
        return zrbm;
    }

    public void setZrbm(Nbbm zrbm) {
        this.zrbm = zrbm;
    }
}
